﻿#pragma once
#include <map>
#include <wrl/client.h>

#include "../../../Common/D3DUtil.h"
#include "../../../Common/d3dx12.h"
#include "../../../Common/RootSignatureManager.h"

enum class RootSignatureType : int
{
    Default = 0,
    Wave = 1,
    VecAndAdd = 2,
    Blur = 3,
    Composite = 4,
    Tessellation = 5
};

class Dx2RootSignatureManager : public RootSignatureManager
{
public:
   virtual  void BuildRootSignature(ID3D12Device* device) override;
   Microsoft::WRL::ComPtr<ID3D12RootSignature> GetRootSignature(RootSignatureType type);

private:
    void BuildDefaultRootSignature(ID3D12Device* device);
    void BuildWavesRootSignature(ID3D12Device* device);
    void BuildVecAddRootSignature(ID3D12Device* device);
    void BuildBlurRootSignature(ID3D12Device* device);
    void BuildCompositionRootSignature(ID3D12Device* device);
    void BuildTessellationRootSignature(ID3D12Device* device);

private:
    std::unordered_map<RootSignatureType, Microsoft::WRL::ComPtr<ID3D12RootSignature>> mRootSignatures;
};
